package leetcode392

func isSubsequence(s string, t string) bool {
	if len(s) == 0 {
		return true
	}
	j := 0
	for i := 0; i < len(s); i++ {
		for ; j < len(t); j++ {
			if s[i] == t[j] {
				if i == len(s)-1 {
					return true
				}
				j++
				break
			}
		}
	}
	return false
}
